package mp.study.demo.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import mp.study.demo.bean.User;
import mp.study.demo.mapper.UserMapper;
import mp.study.demo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;

/**
 * @author 朝花不迟暮
 * @version 1.0
 * @date 2020/6/20 9:32
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService
{
    @Autowired
    private UserMapper userMapper;

    @Override
    public List<User> queryAll()
    {
        Set<String> set = new LinkedHashSet<>();
        set.add("id");
        set.add("name");
        set.add("age");
        return userMapper.queryAll(set);
    }
}
